package com.example.huitong.ui;

import com.example.huitong.R;
import com.example.huitong.fragments.RegisterFragment;

import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.view.MenuItem;

public class RegisterActivity extends FragmentActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_common);
        if (savedInstanceState == null) {
        	getSupportFragmentManager().beginTransaction()
					.add(R.id.container, new RegisterFragment()).commit();
		}
        getActionBar().setDisplayHomeAsUpEnabled(true);
        getActionBar().setBackgroundDrawable(getResources().getDrawable(R.drawable.actionbar_bg));
        getActionBar().setTitle("用户注册");
    }
    
    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
    	// TODO Auto-generated method stub
    	switch (item.getItemId()) {
		case android.R.id.home:
			finish();
			return true;
		}
    	
    	return super.onOptionsItemSelected(item);
    }
}
